/*
*			Ö±ÏßÐÍ»º³åÇø,»º³åÇøÂúÐèÒªµÈ´ý
*/
#pragma once
#include "CxType.h"
#include <deque>
#include <vector>
#include "CxImageBuffer.h"

using std::deque;

BEGIN_NAMESPACE(DataRevPart)

class CxLinerBuffer :  public CxImageBuffer< deque >
{
public:
	CxLinerBuffer(size_t size=16);
	~CxLinerBuffer();

public:
	Mat			Pop();
	void		Push(const Mat &);

	void		Clear();
	void		LoseEffictive()
	{
		_Mutex::scoped_lock lock(m_mu);
		m_effictive=false;
		m_readcond.notify_one();
	}
private:
	volatile	 bool			m_effictive;
	_Cond						m_readcond;
	_Cond						m_writecond;
};


END_NAMESPACE 
